home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1998 August / PC Direct August 1998.iso / S / powerj / Product / hpp.z / DTUOBJ.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  8.0 KB  |  138 lines

  1. #ifndef _DTUOBJ_HPP
  2. #define _DTUOBJ_HPP
  3.  
  4. #include "dtobase.hpp"
  5.  
  6. class METAEXPORTCLASSDEF DTUObject : public DTObject {
  7.     public:
  8.         DTUObject( const MetaObject * meta, WObject * imp = NULL );
  9.         ~DTUObject();
  10.  
  11.     public:
  12.         WBool           operator== ( const DTObject & ) const;
  13.         void            DTGetRectangle( WRect & r,
  14.                                                 WBool abs = FALSE ) const;
  15.         void            DTSetRectangle( const WRect & r, WBool abs = FALSE );
  16.         void            DTGetClientRectangle( WRect & r ) const;
  17.         void            DTGetRCRectangle( WRect & r ) const;
  18.         WRect           DTMapPixelsToDLU( const WRect & pix ) const;
  19.         WRect           DTMapDLUToPixels( const WRect & dlu ) const;
  20.         void            DTBringToTop();
  21.         void            DTRepaint( WRect * rect=NULL );
  22.         void GenFileFragment( MMFileFragment fg, WStringList &,
  23.                                         MMFileGenerationParms * parms ) const;
  24.         void GenerateCode( MMCodeGeneration, ostream &, MMCodeGenerationParms & );
  25.         void GetRequiredIncludes( WStringList & a ) const;
  26.         void GetRequiredBaseClasses( WStringList & a ) const;
  27.         const MetaObject *  GetMeta() const;
  28.         void                SetMeta( const MetaObject * );
  29.         const MetaObject *  GetRefCardMeta() const;
  30.         void            DTSetName( const WString & name );
  31.         WString         DTGetName() const;
  32.         WString         DTGetClassName() const;
  33.         void            SetClassDefinition( const WString & );
  34.         WString         GetClassDefinition() const;
  35.         void            SetClassIncludes( const WString & );
  36.         WString         GetClassIncludes() const;
  37.         WObject *       GetWImplementation() const;
  38.         void            SetWImplementation( WObject * wobj, WBool deleteOld );
  39.         DTObject *      GetConcreteImplementation();
  40.         const DTObject *GetConcreteImplementation() const;
  41.         WWindow *       GetWindow() const;
  42.         WWindow *       DTGetParent() const;
  43.         void            SetResourceID( long id );
  44.         long            GetResourceID() const;
  45.         void            SetTabIndex( long idx );
  46.         long            GetTabIndex() const;
  47.         const DTCodeBlockList & GetCodeBlockList() const;
  48.         DTCodeBlockList &       GetCodeBlockList();
  49.         WInt                    GetAllCodeBlockLists( DTCodeBlockListList & );
  50.         DTCodeBlockBase *       RemoveEvent( DTCodeBlockBase * );
  51.         DTCodeBlockBase *       FindEvent( const char * ) const;
  52.         WBool                   AllowEvent( const MMEvent * ) const;
  53.         FormEdit *      GetForm() const;
  54.         DTFormEditBase *GetDTForm() const;
  55.         void            SetForm( DTFormEditBase * );
  56.         int             GetChildCount() const;
  57.         DTObject *      GetChild( int index ) const;
  58.         WBool           AddChild( DTObject *, int after = -1 );
  59.         WBool           RemoveChild( DTObject * );
  60.         DTObject *      GetParent() const;
  61.         WStyle          GetStyle() const;
  62.         WBool           SetStyle( WStyle stl, WBool clone=FALSE );
  63.         WStyle          GetDefaultStyle() const;
  64.         WStyle          GetExtendedStyle() const;
  65.         WBool           SetExtendedStyle( WStyle style, WBool clone=FALSE );
  66.         WStyle          GetDefaultExtendedStyle() const;
  67.         void            SetInternalStyle( WStyle s, WStyle ex );
  68.         WBool           Create( WWindow * parent, const WRect & r,
  69.                                         const WChar * text, WStyle style,
  70.                                         WStyle exStyle, void * data = NULL,
  71.                                         WBool isLoading = FALSE );
  72.         WBool           GetNonVisual() const;
  73.         WBool           HasDTInfo();
  74.         WBool           SaveDTInfo( SaveSource & );
  75.         WBool           LoadDTInfo( SaveBlock *, WBool beforeCreate );
  76.         WBool           CreateEventPopupMenu( WPopupMenu * popup );
  77.         WBool           GetVisible();
  78.         WBool           SetVisible( WBool visible );
  79.         WBool           GetIsMoveable();
  80.         WBool           GetIsResizeable();
  81.         WBool           GetIsHollow();  // groupbox
  82.         WRect           GetHollowRect();        // interior of groupbox
  83.         WBool           SetDTPopupMenu( DTObject * );
  84.         DTObject *      GetDTPopupMenu() const;
  85.         void            AmendPopup( WPopupMenu *, WBool before );
  86.         WBool           IsValidChild( const MetaObject *obj, WString &errMsg ) const;
  87.         WBool           IsValidContainer( const DTObject *obj, WString &errMsg ) const;
  88.         WBool           DTSetEventHandler( WEventID id, WObject * object, WEventHandler handler, void *userdata=NULL );
  89.         WBool           DTRemoveEventHandler( WEventID id, WObject * object, WEventHandler handler );
  90.         WBool           DTCallEventHandler( WEventID id, WObject * object, WEventData * eventData=NULL, WLong * retval=NULL, WInt indexToStartAt=0 ) const;
  91.         DTIInterface *  GetDTIInterface( const WChar * ifname );
  92.         WBool           GetProtected() const;
  93.         WBool           EditProperties( WWindow *, WBool child = FALSE );
  94.         void                    ClearPropertyEditor( WBool deleteNow = FALSE );
  95.         WBool                   UpdatePropertyRect();
  96.         MTPropertyDialog *      GetPropDialog();
  97.         WBool                   HasProperty( const WString & name ) const;
  98.         WString                 GetProperty( const WString & name, DT_TextifyV t = 1 ) const;
  99.         WBool                   GetPropertyBool( const WString & name ) const;
  100.         WLong                   GetPropertyEnum( const WString & name ) const;
  101.         WRect                   GetPropertyRect( const WString & name ) const;
  102.         WLong                   GetPropertyLong( const WString & name ) const;
  103.         WBool                   SetProperty( const WString & name, const WString & val, DT_TextifyV t = 1 );
  104.         WBool                   SetPropertyBool( const WString & name, WBool val );
  105.         void                    SetPropertyEnum( const WString & name, WLong val );
  106.         void                    SetPropertyRect( const WString & name, const WRect & r );
  107.         void                    SetPropertyLong( const WString & name, WLong r );
  108.         WString                 GetMappedValue( WUInt i ) const;
  109.         void                    SetMappedValue( WUInt i, const WString & s );
  110.         void                    PropertyChanged( const WString & name );
  111.         void                    SetAllowUpdates( WBool allow, WBool doPropertyChanged = TRUE );
  112.         WBool                   GetAllowUpdates() const;
  113.         void                    DetachEditor();
  114.         WString                 GetObjectPrefix() const;
  115.         void                    GenName( WUInt id, WString & ) const;
  116.         void                    GenClassName( WString & ) const;
  117.         void                    GenResourceName( WString & ) const;
  118.         void                    GenResourceStyles( WStringList &, WStringList & ) const;
  119.         void                    GenEventObjectName( WString & ) const;
  120.         const MMStyle *         FindStyle( const char * ) const;
  121.         const MMProperty *      FindProperty( const char * ) const;
  122.         DTObjectImp *           GetImplementation();
  123.         void                    EscapeCString( WString &, const WString & ) const;
  124.  
  125.         DTUserFunctionVect const &  GetUserFunctionVect( void ) const;
  126.         DTUserFunctionVect &        GetUserFunctionVect( void );
  127.         void                        AddUserFunction( DTCodeBlockBase * );
  128.         void                        RemoveUserFunction( DTCodeBlockBase * );
  129.         DTCodeBlockBase *           FindUserFunction( char const * );
  130.         DTCodeBlockBase *           GetCMCodeBlock( unsigned long ) const;
  131.         void                        SetCMCodeBlock( unsigned long, DTCodeBlockBase * );
  132.  
  133.     private:
  134.         DTObject *              _base;
  135. };
  136.  
  137. #endif // _DTUOBJ_HPP
  138.